{block scripts}
  <script>
    $(document).ready(function(){
      $('#frm-bannerForm-fromdate').datetimepicker({
        format: 'd.m.Y H:00'
      });
      $('#frm-bannerForm-todate').datetimepicker({
        format: 'd.m.Y H:00'
      });
    });
  </script>
{/block}

{block content}
  <h1>Přidat banner</h1>
  {form bannerForm class=>form-horizontal}
    <div class="form-group">
      <ul class="errors col-xs-4 col-xs-offset-4" n:if="$form->hasErrors()">
        <li n:foreach="$form->errors as $error" class="alert alert-danger alert-dismissable">
          <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
          <strong>{$error}</strong>
        </li>
      </ul>
    </div>

    <div class="form-group">
      {label title class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input title}
      </div>

      {label position class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input position}
      </div>
    </div>
    
    <div class="form-group">
      {label text class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input text}
      </div>
      {label style class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input style}
      </div>
    </div>
      
    <div class="form-group">
      {label link class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input link}
      </div>
      {label image class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input image}
      </div>
    </div>
      
    <div class="form-group">
      {label fromdate class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input fromdate}
      </div>
      {label todate class=>array(control-label, col-xs-2)/}
      <div class="col-xs-3">
        {input todate}
      </div>
    </div>
      
    <div class="form-group">
      <div class="col-xs-4 col-xs-offset-5">
        {input send class=>array(btn, btn-success, btn-md)}
        &nbsp;
        <a n:href="Banner:default" class="btn btn-danger btn-md">Zrušit</a>
      </div>
    </div>
  {/form}
{/block}